import request from '@/utils/request.js'
// 申请领用
export const applyAdd = (data) => {
    return request({
        url: '/applyTake/add',
        method: 'POST',
        data: data
    })
}
//编辑领用
export const applyUpdate = (data) => {
    return request({
        url: '/applyTake/update',
        method: 'POST',
        data: data
    })
}
// 分页查询
export const applyPage = (data) => {
    return request({
        url: '/applyTake/page',
        method: 'GET',
        params: data
    })
}
// 审批页面列表
export const applyUnpass = (data) => {
    return request({
        url: '/applyTake/pageunpass',
        method: 'GET',
        params: data
    })
}
//通过申请
export const applyPass = (data) => {
    return request({
        url: '/applyTake/pass',
        method: 'POST',
        data: data
    })
}
// 批量同意
// export const applyPassBatch = (data) => {
//     return request({
//         url: '/applyTake/passbatch',
//         method: 'POST',
//         data: data
//     })
// }
export const applyPassBatch = (applyId) => {
    return request.post('/applyTake/passbatch/?ids='+applyId)
}
// export const applyPassBatch = (applyId) => {
//     return request({
//       url: '/applyTake/passbatch/' + applyId,
//       method: 'GET',
//     })
//   }
// 删除
// export const applyDelete = (data) => {
//     return request({
//         url: '/applyTake/del',
//         method: 'POST',
//         data: data
//     })
// }
export const applyDelete = (applyId) => {
    return request.delete('/applyTake/'+applyId)
}